package mobi.hami.huapin.dao;

import mobi.hami.huapin.daobase.CrudMapper;
import mobi.hami.huapin.model.UserAddressLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;

/**
 * Create by 小峰 on 2018/8/24.
 */
public interface UserAddressLogMapper  extends CrudMapper<UserAddressLog> {

    @Select("select  address_id from user_address_log where user_id=#{userId} and address_id !=#{addressId} order by id desc LIMIT 1")
    Integer getPrevoiusAddressId(@Param("userId") Integer userId, @Param("addressId") Integer addressId);
}
